package com.ybkj.daijia.server.errand;

import java.io.Serializable;
import java.util.Date;

/**
 * 跑腿类型型与公司的关联对象
 *
 * @author Administrator
 */
public class ErrandTypeCompany implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private Date created;
    private Date updated;
    private Long typeId;//类型Id
    private Long companyId;//公司Id
    private String companyName;//公司名称
    private Long mileAreaId;

    private Long weightAreaId;

    private String mileAreaName;

    private String weightAreaName;

    private String ifPrepay;

    private String payType;

    private String appKey;

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public Long getMileAreaId() {
        return mileAreaId;
    }

    public void setMileAreaId(Long mileAreaId) {
        this.mileAreaId = mileAreaId;
    }

    public Long getWeightAreaId() {
        return weightAreaId;
    }

    public void setWeightAreaId(Long weightAreaId) {
        this.weightAreaId = weightAreaId;
    }

    public String getMileAreaName() {
        return mileAreaName;
    }

    public void setMileAreaName(String mileAreaName) {
        this.mileAreaName = mileAreaName;
    }

    public String getWeightAreaName() {
        return weightAreaName;
    }

    public void setWeightAreaName(String weightAreaName) {
        this.weightAreaName = weightAreaName;
    }

    public String getIfPrepay() {
        return ifPrepay;
    }

    public void setIfPrepay(String ifPrepay) {
        this.ifPrepay = ifPrepay;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ErrandTypeCompany other = (ErrandTypeCompany) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCreated() == null ? other.getCreated() == null
            : this.getCreated().equals(other.getCreated()))
            && (this.getUpdated() == null ? other.getUpdated() == null
            : this.getUpdated().equals(other.getUpdated()))
            && (this.getTypeId() == null ? other.getTypeId() == null
            : this.getTypeId().equals(other.getTypeId()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null
            : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getCompanyName() == null ? other.getCompanyName() == null
            : this.getCompanyName().equals(other.getCompanyName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", created=").append(created);
        sb.append(", updated=").append(updated);
        sb.append(", typeId=").append(typeId);
        sb.append(", companyId=").append(companyId);
        sb.append(", companyName=").append(companyName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}